﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using HHL_Acc.HHL_DaoAcc.DataBase;
using HHL_Acc.HHL_EntityAcc;

namespace HHL_Acc.HHL_DaoAcc.DataObject
{
    class SmiTicketCompDao : CBaseDao
    {
        private const string _Ticketcode = "Ticketcode";
        private const string _Qty = "Qty";
        private const string _SerialFrom = "SerialFrom";
        private const string _MyTable = "Smi_Ticket_Comp";
        public DataTable GetAllSmiTicketComp()
        {
            String sql =
                @"Select * from " + _MyTable;
            DataSet ds = ExcuteSql(sql);
            return ds.Tables[0];
        }
        public DataTable GetListWithTicketcode(string strTicketcode)
        {
            String sql =
                @"Select * from " + _MyTable + " Where Ticketcode='" + strTicketcode + "'";
            DataSet ds = ExcuteSql(sql);
            return ds.Tables[0];
        }
        public DataTable GetListLikeString(string strTicketcode)
        {
            String sql =
                @"Select * from " + _MyTable + " Where Ticketcode like '" + strTicketcode + "'";
            DataSet ds = ExcuteSql(sql);
            return ds.Tables[0];
        }
    }
}
